<?php
namespace app\adminapi\logic;
class AuthLogic{
    public function check(){
        $controller = request()->controller();
        $action = request()->action();
        if($controller == 'Index' && $action == "index"){
            return true;
        }
        $user_id = input('user_id');
        $info = \app\common\model\Admin::find($user_id);
        $role_id = $info['role_id'];
        if($role_id==1){
            return true;
        }
        $role = \app\common\model\Role::find($role_id);
        $role_auth_ids = $role['role_auth_ids'];
        $role_auth_ids = explode(',',$role_auth_ids);
    }
}